
package com.miniapp.controller;

import com.miniapp.dto.PageDTO;
import com.miniapp.dto.SimpleSearchDTO;
import com.miniapp.entity.MiniUserEntity;
import com.miniapp.service.MiniLogService;
import com.miniapp.utils.R;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


/**
 * 系统日志
 * 
 * @author linyuchi
 * @email xunli-03@163.com
 * @date 2017-03-08 10:40:56
 */
@Controller
@RequestMapping("/sys/log")
public class MiniLogController extends AbstractController {
	@Autowired
	private MiniLogService miniLogService;
	
	/**
	 * 列表
	 */
	@ResponseBody
	@GetMapping("/list")
	@RequiresPermissions("sys:log:list")
	public R list(){

		SimpleSearchDTO simpleSearchDTO = getSearchDtoFromJqGrid();
		PageDTO<MiniUserEntity> page = miniLogService.findPageBySimpleSearch(simpleSearchDTO);

		return R.ok().put("page", page);

	}
	
}
